home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / QuickDraw 3D / Documentation / d e v e l o p / Develop Issue 23 article / Geometry Sample / Headers / QuickDraw3DSupport.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-14  |  1.9 KB  |  65 lines  |  [TEXT/MPCC]

  1.  
  2.  
  3. #ifndef __QUICKDRAW3DSUPPORT__
  4. #define __QUICKDRAW3DSUPPORT__
  5.  
  6. // QuickDraw 3D stuff
  7. #include "QD3D.h"
  8. #include "QD3DGroup.h"
  9. #include "QD3DErrors.h"
  10. #include "QD3DView.h"
  11.  
  12.  
  13. #include "WindowObj.h"
  14.  
  15.  
  16. enum {
  17.     iWF = 1,
  18.     iCTSW = 3,
  19.     iCTHW
  20. };
  21.  
  22. enum {
  23.     iFlat = 1,
  24.     iVertex,
  25.     iPixel
  26. } ;
  27.  
  28.  
  29. struct _documentRecord {
  30.     TQ3ShaderObject            fShader ;                // illumination shader for the object
  31.     TQ3ViewObject            fView ;                    // the view for the scene
  32.     TQ3GroupObject            fModel ;                // object in the scene being modelled
  33.     TQ3StyleObject            fInterpolation ;        // interpolation style used when rendering
  34.     TQ3StyleObject            fBackFacing ;            // whether to draw shapes that face away from the camera
  35.     TQ3StyleObject            fFillStyle ;            // whether drawn as solid filled object or decomposed to components
  36.     TQ3Matrix4x4            fRotation;                // the transform for the model
  37.     TQ3Point3D                fGroupCenter ;            // the center of the group (for rotation) 
  38.     float                    fGroupScale    ;            // scaling factor to apply before drawing
  39.     TQ3InterpolationStyle    fCurrentInterpolation;    // the current interpolation style for the main group
  40. };
  41.  
  42. typedef struct _documentRecord DocumentRec, *DocumentPtr, **DocumentHdl;
  43.  
  44. void InitQuickDraw3DSupport(void);
  45. void TeardownQuickDraw3DSupport(void);
  46.  
  47. DocumentHdl GetDocumentHdl(WindowObjHndl obj);
  48. DocumentHdl    CreateDocument(WindowPtr win);
  49. void InitDocumentData(WindowPtr, DocumentHdl); 
  50. void DisposeDocumentData(DocumentHdl);
  51.  
  52. void SetWindowGeometry( WindowPtr win, short item );
  53. void SetWindowRenderer( WindowPtr win, short item );
  54. void SetWindowShading( WindowPtr win, short item ) ;
  55.  
  56. TQ3ViewObject            MyNewView(WindowPtr theWindow) ;
  57. TQ3DrawContextObject    MyNewDrawContext( WindowPtr theWindow) ;
  58. TQ3CameraObject            MyNewCamera(WindowPtr theWindow) ;
  59. TQ3GroupObject            MyNewLights(void) ;
  60. TQ3GroupObject            MyNewModelFromFile(FSSpec *theFileSpec) ;
  61.  
  62. TQ3Status SubmitScene(DocumentHdl theDocument);
  63. TQ3Point3D AdjustCamera(DocumentHdl theDocument, short winWidth, short winHeight);
  64.  
  65. #endif